<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilplmi: xplmi_task.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilplmi
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xplmi__task_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xplmi_task.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains code Task handling. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date        Changes
</p>
<hr/>
<p>
1.00  kc   02/06/2019 Initial release
1.01  kc   07/16/2019 Added PERF macro to print task times
1.02  kc   02/17/2020 Task dispatcher updated with round robin from FCFS
      bsv  04/04/2020 Code clean up
1.03  kc   07/28/2020 WDT support added to set PLM live status
      bm   10/14/2020 Code clean up
      td   10/19/2020 MISRA C Fixes
1.04  kc   11/30/2020 Disable interrupts while updating shared data
1.05  skd  03/12/2021 Added provision to skip scheduling a task if it is
                      already present in queue
      ma   03/24/2021 Reduced minimum digits of time stamp decimals to 3
      skd  03/31/2021 Adding non periodic tasks even if a task
                      with the same handler exists, to ensure no
                      interrupt task handlers get missed
      bm   04/03/2021 Move task creation out of interrupt context
      bsv  04/08/2021 Moved Task Time prints to DEBUG_DETAILED to reduce
                      logs on console
1.06  td   07/08/2021 Fix doxygen warnings
      ma   07/12/2021 Minor updates to task related code
      ma   08/05/2021 Add separate task for each IPI channel
1.07  bm   02/04/2022 Fix race condition in task dispatch loop
      bsv  03/05/2022 Fix exception while deleting two consecutive tasks of
                      same priority
      bsv  03/11/2022 Restore race condition fix that got disturbed by
                      previous patch
1.08  ng   11/11/2022 Updated doxygen comments
2.00  ng   12/27/2023 Reduced log level for less frequent prints
      ng   01/28/2024 optimized u8 variables</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga9a408541546aa1b8c599ce75c1f5c7d9"><td class="memItemLeft" align="right" valign="top">XPlmi_TaskNode *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilplmi__server__apis.html#ga9a408541546aa1b8c599ce75c1f5c7d9">XPlmi_TaskCreate</a> (TaskPriority_t Priority, int(*Handler)(void *Arg), void *PrivData)</td></tr>
<tr class="memdesc:ga9a408541546aa1b8c599ce75c1f5c7d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function creates the task and initializes its fields with the user parameters.  <a href="group__xilplmi__server__apis.html#ga9a408541546aa1b8c599ce75c1f5c7d9">More...</a><br/></td></tr>
<tr class="separator:ga9a408541546aa1b8c599ce75c1f5c7d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5c2739a1280c0963a4e71cf84aea5204"><td class="memItemLeft" align="right" valign="top">XPlmi_TaskNode *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilplmi__server__apis.html#ga5c2739a1280c0963a4e71cf84aea5204">XPlmi_GetTaskInstance</a> (int(*Handler)(void *Arg), const void *PrivData, const u32 IntrId)</td></tr>
<tr class="memdesc:ga5c2739a1280c0963a4e71cf84aea5204"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns the instance of the task with matching handler and private data or with matching interrupt id.  <a href="group__xilplmi__server__apis.html#ga5c2739a1280c0963a4e71cf84aea5204">More...</a><br/></td></tr>
<tr class="separator:ga5c2739a1280c0963a4e71cf84aea5204"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadbfc56f5e2b34a2bd07996a3231becb2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilplmi__server__apis.html#gadbfc56f5e2b34a2bd07996a3231becb2">XPlmi_TaskTriggerNow</a> (XPlmi_TaskNode *Task)</td></tr>
<tr class="memdesc:gadbfc56f5e2b34a2bd07996a3231becb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function adds the task to the task queue so that it can be triggered based on its priority.  <a href="group__xilplmi__server__apis.html#gadbfc56f5e2b34a2bd07996a3231becb2">More...</a><br/></td></tr>
<tr class="separator:gadbfc56f5e2b34a2bd07996a3231becb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9a8fa5b2fda2c5639ec63f6a75dc54a9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilplmi__server__apis.html#ga9a8fa5b2fda2c5639ec63f6a75dc54a9">XPlmi_TaskInit</a> (void)</td></tr>
<tr class="memdesc:ga9a8fa5b2fda2c5639ec63f6a75dc54a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function initializes the task queues list.  <a href="group__xilplmi__server__apis.html#ga9a8fa5b2fda2c5639ec63f6a75dc54a9">More...</a><br/></td></tr>
<tr class="separator:ga9a8fa5b2fda2c5639ec63f6a75dc54a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac417102cdb74ac7c522ce119729870ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xilplmi__server__apis.html#gac417102cdb74ac7c522ce119729870ff">XPlmi_TaskDispatchLoop</a> (void)</td></tr>
<tr class="memdesc:gac417102cdb74ac7c522ce119729870ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function will be checking for tasks in the queue based on the priority.  <a href="group__xilplmi__server__apis.html#gac417102cdb74ac7c522ce119729870ff">More...</a><br/></td></tr>
<tr class="separator:gac417102cdb74ac7c522ce119729870ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
